package com.citytransport.prokopjuk.vehicleDTO;

/**
 * class Tram inherits abstract class Vehicle.
 * 
 * @author Prokopj'uk Oleksander
 * @version 1.0
 */
public class Tram extends Vehicle {
    private boolean speedy;
    private int amountVagon;

    /** No-arg constructor */
    public Tram() {
	super();
	speedy = false;
	amountVagon = 0;
    }

    public Tram(int seatAmount, String registrationNumber, String model,
	    boolean speedy, int amountVagon) {
	super(seatAmount, registrationNumber, model);
	this.speedy = speedy;
	this.amountVagon = amountVagon;
    }
    
    public Tram(int tramID, int seatAmount, String registrationNumber, String model,
	    boolean speedy,int amountVagon) {
	super(tramID, seatAmount, registrationNumber, model);
	this.speedy = speedy;
	this.amountVagon = amountVagon;
    }

    public int getAmountVagon() {
	return amountVagon;
    }

    public void setAmountVagon(int amountVagon) {
	this.amountVagon = amountVagon;
    }

    /**
     * Return whether tram speedy or not.
     * */
    public boolean isSpeedy() {
	return speedy;
    }

    public void setSpoody(boolean speedy) {
	this.speedy = speedy;
    }

    public String toString() {
	String word = "is speedy";
	if (!isSpeedy())
	    word = "does not speedy";
	return super.toString() + " tram " + word;
    }

}
